﻿#ifndef NOSEPIECELIBLOADER_H
#define NOSEPIECELIBLOADER_H
#include <QLibrary>

#include "../Nosepiece_global.h"
#include "NosepieceInterface.h"
namespace Qly {

class NOSEPIECE_EXPORT NosepieceLibLoader : public QObject
{
public:
    NosepieceLibLoader(QString dllFullName, QObject *parent);
    NosepieceInterface * createInstance(QObject *p);
    void release(NosepieceInterface * p);

private:
    QLibrary * pNosepieceLib;

    typedef Qly::NosepieceInterface * (*CreateInstanceType)(QObject *);
    typedef void (*ReleaseType)(Qly::NosepieceInterface *);

    CreateInstanceType CreateInstance = nullptr;
    ReleaseType Release = nullptr;
};

}


#endif // NOSEPIECELIBLOADER_H
